#ifndef _PARTHUS_SYS_INIT_
#define _PARTHUS_SYS_INIT_

/***********************************************************************
 *
 * HEADER NAME:    sys_init.h
 * PROJECT CODE:   BlueStream
 * DESCRIPTION:    hal specific init code
 * MAINTAINER:     Raymond Burke
 * CREATION DATE:  21 September 2001
 *
 * SOURCE CONTROL: $Id: sys_init.h,v 1.9 2009/12/11 06:30:44 tianwq Exp $
 *
 * LICENSE:
 *     This source code is copyright (c) 2001-2004 Ceva Inc.
 *     All rights reserved.
 *
 *
 ***********************************************************************/

/* host wake setting */
#define HOSTWAKE_METHOD_INTERRUPT               0x008
#define HOSTWAKE_BOTHEDGE                       0x004
#define HOSTWAKE_POLARITY                       0x002
#define HOSTWAKE_CLRMODE                        0x001
#define HOSTWAKE_ENABLE                         0x080
#define HOSTWAKE_IGNORE_NEEDBIT                 0x040
#define HOSTWAKE_METHOD_PUSLE                   0x020
#define HOSTWAKE_GPIO_PUSLE                     0x010

#define RDA_WDT_RESET_PW                        7
#define RDA_WDT_ENABLE                          1
#define RDA_WDT_RESTART_VAL                     0x76
//0.5s watch dog
#define RDA_WDT_INIT_VAL                        0x20000

typedef void (*t_Wake_Host_Ptr)(void);


void SYSinit_Initialise(void);
void SYSinit_Store_Manufacturing_Information(void);

/*
 * Initialisation of GPIO and Operations
 */
void SYSinit_Gpio_Initialise(void);
void SYSinit_Gpio_Write(u_int8 index, u_int8 value);
u_int8 SYSinit_Gpio_Read(u_int8 index);//Lu added

/* wake up host */
void SYSinit_Wake_Host(u_int16 host_wake_flag);
void SYSinit_Set_Host_Wake_Filter(t_Wake_Host_Ptr pfn);

void SYSinit_Wdt(void);

#endif

